package com.fay.designPattern.principles.pro2;

import feign.Feign;
import feign.codec.Encoder;
import feign.form.FormEncoder;
import org.springframework.http.codec.json.Jackson2JsonEncoder;

/**
 * @Title:
 * @Description:
 * @Author Fay Wang
 * @Date 2022/3/21 15:25
 * @Version 1.0
 */
public class FeignClient {
    public static void main(String[] args) {
        Feign myFeign = Feign.builder()
                .logger(new CustomizedLogger())
                .encoder(new FormEncoder((Encoder) new Jackson2JsonEncoder()))
                .errorDecoder(new ResponseErrorDecoder())
                .requestInterceptor(new RequestHeadersInterceptor()).build();
    }
}
